package com.sparkseries.enums;

/**
 * 推送通知状态
 */
public enum NoticeStatusEnum {

    /**
     * 删除
     */
    DELETE(0,"删除"),
    /**
     * 正常
     */
    NORMAL(1,"正常"),
    /**
     * 撤回
     */
    REVOKED(2,"撤回"),
    /**
     * 草稿
     */
    DRAFT(3,"草稿");

    private final Integer code;
    private final String desc;

    NoticeStatusEnum(Integer code,String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return this.code;
    }

    public static String getDesc(int code) {
        for (NoticeStatusEnum status : values()) {
            if (status.code == code) {
                return status.desc;
            }
        }
        return "未知状态";
    }

}